﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace WorkNodeFramework
{
    public abstract class TableProvider
    {
        DataProvider provider;
        protected TableProvider(DataProvider provider)
        {
            this.provider = provider;
        }

        public DataProvider Provider
        {
            get {
                return provider;
            }
        }

        public abstract SqlDbType GetSqlDbType(string dbTypeName);
        public abstract string GetSqlDbTypeName(SqlDbType dbType);
        public abstract Type GetDataType(SqlDbType dbType);
        public abstract void Create(params Table[] tables);
        public abstract bool Exist(string tableName);
        public abstract ExecuteCommand GetCreateCommand(Table table);
    }
}
